package dao

import(
	
)

func GetAllPhysical_exam() (error, []models.Employees, int64) {
	var physical_examData []models.Physical_exam
	var total int64
	err := db.Table("physical_exam").Order("pno ASC").Find(&physical_examData).Error
	return err, physical_examData, total
}

func DelPhysical_exam(Pno int) error {
	err := db.Table("physical_exam").Where("sno = ?", pno).Delete(models.Physical_exam{}).Error
	return err
}

func UpdatePhysical_exam(physical_exam models.Physical_exam) error {
	err := db.Table("physical_exam").Where("sno = ?", physical_exam.Pno).Updates(&physical_exam).Error
	return err
}

func AddPhysical_exam(physical_exam models.Physical_exam) error {
	err := db.Table("physical_exam").Create(&employees).Error
	return err
}